import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import render from '@dfeidao/atom-web/render/render';
import set_node_cls from '@dfeidao/atom-web/ui/set-node-cls';
import p001 from './p001';
import p002 from './p002';
import p003 from './p003';


export default async function a001(fd: IFeidaoAiBrowserComponent) {
	// 修改页面样式
	const add = fd.data.node.querySelector<HTMLElement>('[data-id="add"]');
	set_node_cls(add, 'display-n', false);
	// 获取渲染数据
	// 获取页面初始化数据
	const res = await nodejs<{ dt1: Array<{}>, dt2: Array<{}> }>('project-assets/zj-000003/s001', {});
	const d = Object.assign({ dt: res.dt2 }, { de: "政教事业部" });
	const dt = {
		address: "",
		maintenance_time: "",
		timeout_alert: "",
		remark: "",
		timeout_reminder_time: ""
	};
	render(fd, d, p001, 'p001', 'inner');
	render(fd, res.dt1, p002, 'p002', 'inner');
	render(fd, dt, p003, 'p003', 'inner');
}
